<div class="page-container edit-container">
	<div class="spinner-container loading-body" *ngIf="isPosting">
		<mdl-spinner [active]="true"></mdl-spinner>
	</div>
	<div class="edit-header">
		<a routerLink="/company" mdl-ripple mdl-button>
				<i class="material-icons">keyboard_backspace</i> 返回
			</a>
		<mdl-layout-title>{{ IsEdit ? '编辑' : '添加' }}公司</mdl-layout-title>
		<div class="space"></div>
	</div>
	<div class="edit-container mdl-grid">
		<div class="mdl-cell mdl-cell--4-col">
			<div class="mdl-grid">
				<p class="block-title">公司信息</p>
			</div>
			<dynamic-form #companyForm (getPlayLoad)="onLoadFormData($event)" [ctrls]="formControls">
			</dynamic-form>
		</div>
		<location-select class="mdl-cell mdl-cell--8-col" [(Data)]="locationProperties"></location-select>
		<div class="btn-container">
			<button mdl-ripple mdl-button mdl-button-type="raised" [disabled]="!companyForm.form.valid || isFormPosting || locationProperties.length === 0"
			 (click)="save(companyForm)" mdl-colored="primary">
				<i class="material-icons">done</i>保存
			</button>
		</div>
	</div>
</div>